package com.blazer.b;

import java.util.Random;
import java.util.Scanner;

public class arrayscanner {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        int[] arr=new int[3];
        for (int i=0;i<arr.length;i++){
            arr[i]=scanner.nextInt();
        }
        System.out.println(arr);//输出数组的内存地址
        System.out.println(arr[0]);
        System.out.println(arr[1]);
        System.out.println(arr[2]);
        Random random=new Random();
        int[] arr1=new int[3];
        for(int j=0;j<arr1.length;j++){
            arr1[j]=random.nextInt(10);
        }
        System.out.println(arr1.length);
        System.out.println(arr1[0]);
        int[] arr3=new int[3];
        System.out.println(arr3[0]);//默认值0
        int[] newarr=new int[3];
        newarr[0]=arr[0];
        newarr[1]=arr[1];
        newarr[2]=arr[2];
        System.out.println(newarr[0]+"newarr");
        System.out.println(newarr[1]+"newarr");
        System.out.println(newarr[2]+"newarr");
    }
}
